package com.platform.common.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

/**
 * @Author mymac
 * @Date 2024/8/29 1:49 PM
 * @Version 1.0
 */
@AllArgsConstructor
@Getter
public enum StowageStatusEnum {
    ZERO("0", "未配载"),
    ONE("1", "已配载"),
    TWO("2", "部分配置");

    private final String code;
    private final String desc;

    public static StowageStatusEnum getCode(String code) {
        for (StowageStatusEnum value : StowageStatusEnum.values()) {
            if (StringUtils.equals(value.getCode(), code)) {
                return value;
            }
        }
        return null;
    }

}
